﻿using DFGK_WMS.Model.Dto.YS;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.Dto
{
    public class ERPProductionOrderDto
    {
        /// <summary>
        /// 生产任务单编号
        /// </summary>
        public string BillNo { get; set; }
        /// <summary>
        /// 生产车间代码(部门)
        /// </summary>
        public string WorkShopCode { get; set; }
        /// <summary>
        /// 生产车间名称
        /// </summary>
        public string WorkShopName { get; set; }
        /// <summary>
        /// 计划开工日期
        /// </summary>
        public DateTime BeginDate { get; set; }
        /// <summary>
        /// 计划完工日期
        /// </summary>
        public DateTime EndDate { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }
        //其他出入库单据
        public string OtherTypeCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        public string? BatchNo { get; set; }
        /// <summary>
        /// 材料规格型号
        /// </summary>
        public string ModelSpec { get; set; }
        /// <summary>
        /// 是否进行批次管理
        /// </summary>
        public int BatchManager { get; set; }
        /// <summary>
        /// 材料计量单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 物料收货数量
        /// </summary>
        public decimal Qty { get; set; }


    }
    public class BackERPProductionOrderDto
    {
        /// <summary>
        /// 入库单号
        /// </summary>
        public long BillId { get; set; }//编号

        public string BillDate { get; set; }//单据日期
        public string DepartmentNumber { get; set; }//供应商编号
        public string? DepartmentName { get; set; }//供应商编号
        public string SourceNo { get; set; }

        public List<BackERPProductionOrderDetailDto> Entry { get; set; }
    }
    public class BackERPProductionOrderDetailDto
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string Number { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        public string? BatchNo { get; set; }
        /// <summary>
        /// 材料规格型号
        /// </summary>
        public string Model { get; set; }
        /// <summary>
        /// 材料计量单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 物料收货数量
        /// </summary>
        public decimal Qty { get; set; }
        /// <summary>
        /// 质量状态
        /// </summary>
        public string? ISPass { get; set; }
        public string StockNumber { get; set; }
        public string StockPlace { get; set; }
    }


    public class BackERPOtherTypeDto
    {
        /// <summary>
        /// 入库单号
        /// </summary>
        public long BillId { get; set; }//编号

        public string BillDate { get; set; }//单据日期
        public string DepartmentNumber { get; set; }//供应商编号
        public string? DepartmentName { get; set; }//供应商编号
        public string BillType { get; set; }

        public List<BackERPOtherTypeDetailDto> Entry { get; set; }
    }
    public class BackERPOtherTypeDetailDto
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string Number { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        public string? BatchNo { get; set; }
        /// <summary>
        /// 材料规格型号
        /// </summary>
        public string Model { get; set; }
        /// <summary>
        /// 材料计量单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 物料收货数量
        /// </summary>
        public decimal Qty { get; set; }
        /// <summary>
        /// 质量状态
        /// </summary>
        public string? ISPass { get; set; }
        public string StockNumber { get; set; }
        public string StockPlace { get; set; }
    }
}
